﻿#pragma once
#include <string>
class trains
{
private:
	int train_id; // 火车ID
	std::string train_code; // 火车编号
	char type; // 火车类型
	int start_station_id; // 起始站ID	
	int end_station_id; // 终点站ID
public:
	// 构造函数
	trains() = default;
	trains(int train_id, std::string& train_code, char type, int start_station_id, int end_station_id)
		: train_id(train_id), train_code(train_code), type(type), start_station_id(start_station_id), end_station_id(end_station_id) {
	}
	// Get方法声明
	int getTrainId() const;
	std::string getTrainCode() const;
	char getType() const;
	int getStartStationId() const;
	int getEndStationId() const;
	// Set方法声明
	void setTrainId(int id);
	void setTrainCode(std::string& code);
	void setType(char t);
	void setStartStationId(int id);
	void setEndStationId(int id);
};

